/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ejemplo;

import java.io.File;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import javazoom.jlgui.basicplayer.BasicController;
import javazoom.jlgui.basicplayer.BasicPlayer;
import javazoom.jlgui.basicplayer.BasicPlayerEvent;
import javazoom.jlgui.basicplayer.BasicPlayerException;
import javazoom.jlgui.basicplayer.BasicPlayerListener;

public class Reproductor implements BasicPlayerListener {

    private BasicPlayer player;
    public Reproductor() {
        player = new BasicPlayer();
        player.addBasicPlayerListener(this);
        try {
            String ruta = " ";       //RUTA
            player.open(new File(ruta));
            player.play();
            player.setGain(0.3);
        } catch (BasicPlayerException ex) {
            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public void opened(Object arg0, Map arg1) {
        //throw new UnsupportedOperationException("Not supported yet.");
    }

    public void progress(int arg0, long arg1, byte[] arg2, Map arg3) {
       //throw new UnsupportedOperationException("Not supported yet.");
    }

    public void stateUpdated(BasicPlayerEvent arg0) {
        // throw new UnsupportedOperationException("Not supported yet.");
    }

    public void setController(BasicController arg0) {
        //throw new UnsupportedOperationException("Not supported yet.");
    }
}